package com.wang.adapter;

public class ClassAdapter {
    public static void main(String[] args) {
        TargetAdapter targetAdapter = new TargetAdapterImpl();
        targetAdapter.output5v();
    }
}

class Adapter{
    void output220v(){
        System.out.println("220v");
    }
}

interface TargetAdapter{
    void output5v();
}

class TargetAdapterImpl extends Adapter implements TargetAdapter{

    @Override
    public void output5v() {
        output220v();
        System.out.println("对220v进行适配操作……");
        System.out.println("已将220v转化为5v");
    }
}
